<?php
use Core\Widget\WidgetFactory;

$blockInstanceItem = $this->blockInstanceItem;
$divId = $this->divId;
$blockClass_Item = $blockInstanceItem->getBlockClass();
$widgetFactory = new WidgetFactory();
$widget_Abstract = $widgetFactory->getWidget($blockClass_Item->program_code);
$content = $widget_Abstract->render($blockInstanceItem);
?>
<div style="padding:0px 0px 0px 0px" id="<?php echo $divId ?>" class = "block-view" ><?php echo $content?></div>
<div class="action-panel" id = "actionPanel<?php echo $divId ?>">
    <div style="float:left; width:100px">
        <a id = "lnkAddBlock<?php echo $divId ?>"  href="javascript:openBlockSelector('<?php echo $divId ?>')" ><i class="fa fa-lg fa-plus"></i>&nbsp;<span>Thêm (Đổi)</span></a>
        &nbsp;
    </div>
    <div style="float:left; width:70px;display:none">
        <a id = "lnkEditBlock<?php echo $divId ?>"  href="javascript:editBlock('<?php echo $divId ?>')" ><i class="fa fa-lg fa-edit"></i>&nbsp;<span>Sửa</span></a>
        &nbsp;
    </div>
    <div style="float:left; width:50px;display:none">
        <a  id = "lnkRemoveBlock<?php echo $divId ?>" href="javascript:removeBlock('<?php echo $divId ?>');" ><i class="fa fa-lg fa-times"></i>&nbsp;<span>Xóa</span></a>
        &nbsp;
    </div>&nbsp;&nbsp;

    <div style="clear:both">
    </div>
</div>
<div class="edit-panel" id="editPanel<?php echo $divId ?>" >
    <div class="edit-editor" id="editor<?php echo $divId ?>"></div>
    <div id="control<?php echo $divId ?>" class="edit-control">
    </div>
</div>
